<%@ page language="java" import="java.util.*,com.hs.auth.model.*,com.hs.dnms.model.*,com.hs.auth.*" pageEncoding="utf-8"%>
<%
	DnmsBook obj = (DnmsBook)request.getAttribute("obj"); 
	List symList = (List)request.getAttribute("symList"); 
	List poiList = (List)request.getAttribute("poiList"); 
    HsAccount accInfo = (HsAccount)request.getSession().getAttribute(AUTHConstant.USERINSESSION);
	String lang = accInfo.getCreatuser() + "";
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="../../include.jsp"%>  
<script src="<%=basePath %>app/javascripts/transform.js"></script>
<script language="javascript" type="text/javascript">
 function downLoadFile(id){
 	window.location.href="<%=basePath%>produce/downloadFile.do?pid="+id;
 } 
 //方剂信息
  function preInfo(id){
    window.parent.auditpre.frameElement.src = "<%=basePath%>audit/auditpre.do?symid="+id;
 } 
 //穴位信息
  function pointInfo(id){
    window.parent.auditpre.frameElement.src = "<%=basePath%>audit/auditpoint.do?pgroupid="+id;
 }     
 //现代疾病
  function modDisInfo(id){
    window.parent.auditpre.frameElement.src = "<%=basePath%>audit/modDisInfo.do?disid="+id;
 }    
   function s2t()
{
	document.body.innerHTML = document.body.innerHTML.s2t();
	document.all.fonttype.value='ft';
	window.parent.auditpre.document.body.innerHTML = window.parent.auditpre.document.body.innerHTML.s2t();
}
function t2s()
{
	document.body.innerHTML = document.body.innerHTML.t2s();
	document.all.fonttype.value='jt';
	window.parent.auditpre.document.body.innerHTML = window.parent.auditpre.document.body.innerHTML.t2s();
}

</script>
</head>
<body>
<div class="deta_proce">
    <div>
        <table border="0" cellspacing="0" cellpadding="0"> 
        <caption>
          题录信息
          </caption>
          <tr>
            <td width="15%">书籍名称</td>
            <td width="35%"><%=StringUtilTool.NULL2Blank(obj.getBookname()) %><input name="magaid" type="hidden" value="<%=obj.getId()%>"/></td>
            <td width="15%">作者</td>
            <td width="35%"><%=StringUtilTool.NULL2Blank(obj.getAuthor())%></td>
          </tr>
          <tr>
            <td width="15%">古代中医病名</td>
            <td colspan=3><%=StringUtilTool.NULL2Blank(obj.getDiseasename()) %></td> 
          </tr>
          <tr>
            <td width="15%">出版年份</td>
            <td width="35%"><%=StringUtilTool.NULL2Blank(obj.getPublishdate()) %></td>
            <td width="15%">出版社</td>
            <td width="35%"><%=StringUtilTool.NULL2Blank(obj.getPublishhouse()) %></td>
          </tr> 
          <tr>
            <td width="15%">原文文本</td>
            <td  colspan=3><%=StringUtilTool.NULL2Blank(obj.getOriginaltext()) %></td>
             
          </tr> 
           <tr>
            <td width="15%">已上传文件</td>
            <td width="85%" colspan=3>
             <%
             if(null != obj.getFileset() && !(obj.getFileset().isEmpty())){
                   Iterator iter = obj.getFileset().iterator();
                   int i = 0;  
                   while(iter.hasNext()){
          	             DnmsFile fileobj = (DnmsFile)iter.next();
          	             i++; 
          	             Long fileid = fileobj.getId();
          	               
           %>
          	<a href="javaScript:downLoadFile('<%=fileid %>')"><%=fileobj.getFilename() %></a>;
          <%} }%>
            </td> 
          </tr>
        </table> 
        <table border="0" cellspacing="0" cellpadding="0"> 
          <caption>
           疾病信息
          </caption>
          <tr>
            <td width="15%" nowrap>古籍中医病名</td> 
            <td width="85%"><%
            	Set disset = obj.getDisset();
			   	Iterator iter1 = disset.iterator();
			  	 DnmsDisease disobj = null;
			  	 String ancdis = "" ;
			  	 while(iter1.hasNext()){
			   		disobj = (DnmsDisease)iter1.next();
            			
            %>
            <a href="javaScript:modDisInfo('<%=disobj.getId()%>')"><%=disobj.getDiseasename()%></a>;
            <%
            		}
             %>
             </td> 
          </tr> 
          <tr>
           <td width="15%" >
           	    证候
            </td> 
            <td colspan=3>
            <%
            	if(null != symList){
            		for(int j=0; j<symList.size(); j++){
            			Map sym = (Map)symList.get(j);
            			String symptomname = (String)sym.get("symptomname");
            			if(null != symptomname){
            			
            %>
            <a href="javaScript:preInfo('<%=sym.get("id")%>')"><%=symptomname%></a>;
            <%
            		}
            		}
            	}
             %>
            </td>  
          </tr> 
          <tr>
           <td width="15%" >
           	    针灸组
            </td> 
            <td colspan=3>
            <%
            	if(null != poiList){
            		for(int k=0; k<poiList.size(); k++){
            			Map poi = (Map)poiList.get(k);
            			String pgroupname =(String)poi.get("pgroupname");
            			if(null != pgroupname){
            %>
            <a href="javaScript:pointInfo('<%=poi.get("id")%>')"><%=pgroupname%></a>;
            <%
            		}}
            	}
             %>
            </td>  
          </tr>
          <tr>
          	<td width="15%" >
           	    &nbsp;
            </td> 
           <td colspan=3 >
           		<input name="fonttype" id="fonttype" type="hidden" value="jt"/>
           		<input  type="button" value="简体" onclick="t2s();" class="but_2"/>
                <input  type="button" value="繁体" onclick="s2t();" class="but_2"/>
           </td>
          </tr>
        </table>  
    </div>
</div> 
</body>
</html>
<script language="javascript" type="text/javascript">
function fonttransfer(){
  //var fontobj = window.parent.document.all.fonttype;
 // if(fontobj !=null && fontobj !=undefined){
  	//var fonttype = fontobj.value;
  	var fonttype = <%=lang%>;
  	if(fonttype == "2"){
  		document.body.innerHTML = document.body.innerHTML.s2t();
  	}else {
  		document.body.innerHTML = document.body.innerHTML.t2s();
  	}
  //}    
}
setTimeout("fonttransfer()",100);
</script>


